package com.xiangzi.xzschedule.quartz.listener;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MyJobListener implements JobListener {
	
	private Logger _log = LoggerFactory.getLogger(this.getClass());

	@Override
	public String getName() {
		return "MyJobListener";
	}
	
	@Override
	public void jobWasExecuted(JobExecutionContext context,
			JobExecutionException jobException) {
		_log.info(getName() + " says: Job was executed.");
	}

	@Override
	public void jobToBeExecuted(JobExecutionContext context) {
		_log.info(getName() + " says: Job Is about to be executed.");
	}

	@Override
	public void jobExecutionVetoed(JobExecutionContext context) {
		_log.info(getName() + " says: Job Execution was vetoed.");
	}

}
